abstract class F {
    abstract public void fun();

}
class R extends F{
    public void show() {
        System.out.println("show R");
    }

    @Override
    public void fun() {
        System.out.println("R fun");
    }
}

class Q extends F{
    public void show() {
        System.out.println("show R");
    }

@Override
    public void fun() {
        System.out.println("Q fun");
    }
}

public class Test1 {
    public static void fun(F f) {
        f.fun();
    }
    public static void main(String[] args) {
        //F f1 = new F();  抽象类不能实例化
        Q q = new Q();
        fun(q);
    }
}

